// const webpack = require("webpack");
module.exports = {
  publicPath: "./",
  outputDir: "dist",
  assetsDir: "static",
  indexPath: "index.html",
  filenameHashing: true,
  lintOnSave: process.env.NODE_ENV === "production",
  runtimeCompiler: false,
  productionSourceMap: true,
  integrity: false,
  configureWebpack: {
    resolve: {
      alias: {
        "@a": "@/assets",
        "@c": "@/components",
        "@v": "@/views",
        "@u": "@/utils"
      }
    }
  },
  css: {
    extract: false,
    sourceMap: false,
    modules: false,
    loaderOptions: {}
  },
  devServer: {
    port: 8080,
    // host: "127.0.0.1", // 本地IP，打包的时候还原
    host: "192.168.0.183", // 张著剑
    // host: "192.168.0.134", // 欧泽辉
    https: false,
    open: true,
    proxy: {
      "/api": {
        target: "http://111.85.220.186:1314",
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          "^/api": ""
        }
      }
    }
  }
}
